/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package Vista;

import Modelo.GestorTicketCine;
import Modelo.UsuarioRegistrado;

/**
 *
 * @author Miguel Angel
 */
public class VentanaUsuarioRegistrado extends javax.swing.JFrame {
    private GestorTicketCine gtk;
    private UsuarioRegistrado us = new UsuarioRegistrado("def", "def");
    /**
     * Creates new form VentanaInicio
     */
    public VentanaUsuarioRegistrado(GestorTicketCine gtk, UsuarioRegistrado ur) {
        initComponents();
        this.gtk = gtk;
        this.us = ur;
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jB_ComprarEntrada = new javax.swing.JButton();
        jB_ConsultarCines = new javax.swing.JButton();
        jB_IntroducirCrititcas = new javax.swing.JButton();
        jButton1 = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Ticketcine");

        jLabel1.setText("Venta de entrada");

        jB_ComprarEntrada.setText("Comprar entrada");
        jB_ComprarEntrada.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jB_ComprarEntradaActionPerformed(evt);
            }
        });

        jB_ConsultarCines.setText("Consultar cines");
        jB_ConsultarCines.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jB_ConsultarCinesActionPerformed(evt);
            }
        });

        jB_IntroducirCrititcas.setText("Introducir criticas");
        jB_IntroducirCrititcas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jB_IntroducirCrititcasActionPerformed(evt);
            }
        });

        jButton1.setText("Atras");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(48, 48, 48)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jB_ConsultarCines, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jB_ComprarEntrada, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jB_IntroducirCrititcas, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                .addComponent(jLabel1)
                                .addGap(13, 13, 13))))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(82, 82, 82)
                        .addComponent(jButton1)))
                .addContainerGap(58, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addGap(31, 31, 31)
                .addComponent(jB_ComprarEntrada)
                .addGap(28, 28, 28)
                .addComponent(jB_ConsultarCines)
                .addGap(28, 28, 28)
                .addComponent(jB_IntroducirCrititcas)
                .addGap(18, 18, 18)
                .addComponent(jButton1)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jB_ComprarEntradaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jB_ComprarEntradaActionPerformed
        this.dispose();
        ComprarEntradaConUsuario ca = new ComprarEntradaConUsuario(gtk,us);
        ca.setVisible(true);
    }//GEN-LAST:event_jB_ComprarEntradaActionPerformed

    private void jB_ConsultarCinesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jB_ConsultarCinesActionPerformed
        ConsultarCines consultarCines = new ConsultarCines(gtk);
        consultarCines.setVisible(true);
    }//GEN-LAST:event_jB_ConsultarCinesActionPerformed

    private void jB_IntroducirCrititcasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jB_IntroducirCrititcasActionPerformed
        Valoracion val = new Valoracion(us,gtk);
        val.setVisible(true);
    }//GEN-LAST:event_jB_IntroducirCrititcasActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        this.dispose(); 
        ControlAcceso ca = new ControlAcceso(gtk);
        ca.setVisible(true);
    }//GEN-LAST:event_jButton1ActionPerformed
    
    
    /**
     * @param args the command line arguments
     */
//    public static void main(String args[]) {
//        /* Set the Nimbus look and feel */
//        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
//        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
//         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
//         */
//        try {
//            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
//                if ("Nimbus".equals(info.getName())) {
//                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
//                    break;
//                }
//            }
//        } catch (ClassNotFoundException ex) {
//            java.util.logging.Logger.getLogger(VentanaUsuarioRegistrado.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (InstantiationException ex) {
//            java.util.logging.Logger.getLogger(VentanaUsuarioRegistrado.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (IllegalAccessException ex) {
//            java.util.logging.Logger.getLogger(VentanaUsuarioRegistrado.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
//            java.util.logging.Logger.getLogger(VentanaUsuarioRegistrado.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        }
//        //</editor-fold>
//
//        /* Create and display the form */
//        java.awt.EventQueue.invokeLater(new Runnable() {
//            public void run() {
//                new VentanaUsuarioRegistrado().setVisible(true);
//            }
//        });
//    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jB_ComprarEntrada;
    private javax.swing.JButton jB_ConsultarCines;
    private javax.swing.JButton jB_IntroducirCrititcas;
    private javax.swing.JButton jButton1;
    private javax.swing.JLabel jLabel1;
    // End of variables declaration//GEN-END:variables
}
